package com.bjpowernode.boss.mvc.models.form.payway;

import jakarta.validation.constraints.*;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class ConfigProductWayForm {
    @NotNull(message = "需要支付产品编码")
    @Size(min = 5,max = 30,message = "支付产品编码字符数量在{min}-{max}")
    private String productCode;

    @NotNull(message = "需要支付方式编码")
    @Size(min = 5,max = 15,message = "支付方式编码字符数量在{min}-{max}")
    private String wayCode;

    @NotNull(message = "需要支付类型编码")
    @Size(min = 5,max = 15,message = "支付类型编码字符数量在{min}-{max}")
    private String typeCode;

    @NotNull(message = "费率不能空")
    @DecimalMin(value="0.01",message = "费率不能低于{value}%")
    @DecimalMax(value = "1",message = "费率不能高于{value}%")
    private BigDecimal payRate;

    @NotNull(message = "排序位置不能空")
    @Min(value = 1,message = "从1开始")
    private Integer sorts;

}
